Motion tracking using image-texture templates

ABSTRACT

Image templates are extracted from video images in real-time and stored in memory. Templates are selected on the basis of their ability to provide useful positional data and compared with regions of subsequent images to find the position giving the best match. From the position data a transform model is calculated. The transform model tracks the background motion in the current image to accurately determine the motion and attitude of the camera recording the current image. The transform model is confirmed by examining pre-defined image templates. Transform model data and camera sensor data are then used to insert images into the live video broadcast at the desired location in the correct perspective. Stored templates are periodically updated to purge those that no longer give valid or significant positional data. New templates extracted from recent images are used to replace the discarded templates.

CROSS REFERENCE TO RELATED APPLICATIONS

[0001] The present application is a continuation of and claims the benefit of the filing date of co-pending U.S. patent application Ser. No. 09/308,949 filed May 26^(th) 1999, entitled “MOTION TRACKING USING IMAGE-TEXTURE TEMPLATES”, which is hereby incorporated by reference.

[0002] The present application is also related to and claims the benefit of the filing date of U.S. provisional application No. 60/031,883 filed Nov. 27, 1996 entitled “Camera Tracking Using Persistent, Selected, Image-Texture Templates”, which is hereby incorporated by reference.

FIELD OF THE INVENTION

[0003] The present invention relates to improvements in systems that insert selected indicia into live video broadcasts.

DESCRIPTION OF RELATED ART

[0004] Electronic devices for inserting indicia into live video broadcasts have been developed and used for the purpose of inserting advertising, for instance, into sports events. The viability of such devices depends directly on their ability to make the insertion seamlessly and appear as realistically as possible to be part of the actual scene. The insertion must also be robust enough to handle typical camera manipulations such as panning, tilting, zooming, etc. without compromising the integrity of the broadcast.

[0005] A key component in any such indicia insertion system is the ability to track scene motion and background motion from image to image in the broadcast. Reliable tracking data is necessary in order to calculate transform models that adjust an intended insertion to the proper size and perspective prior to insertion of an image in each new image frame.

[0006] U.S. Pat. No. 5,264,933 to Rosser notes that standard methods of pattern recognition and image processing can be used to track background and scene motion. The standard methods of pattern recognition and image processing referred to are feature tracking using normalized correlation of previously stored image templates. These methods work well but not under all conditions.

[0007] Subsequent methods have incorporated what has been termed “adaptive geographic hierarchical tracking” in which an elastic model is used to extend the domain of image frames that can be tracked adequately. The extended domain includes noisy scenes containing a great deal of occlusion. Occlusion refers to action in the current image obscuring some or most of the pre-selected landmarks utilized by an insertion system to calculate the position and perspective of an insert in the live broadcast. The extended domain also includes images containing rapid variations in overall illumination conditions. Adaptive geographic hierarchical tracking requires at least three separate landmarks always be visible in the image as it is being tracked. Since precise image conditions cannot be predicted ahead of time a block matching technique termed “unnormalized correlation” is usually employed.

[0008] The present invention further extends the domain of image frames that can be tracked to include frames in which there are no pre-selected landmarks visible. Unlike adaptive geographic hierarchical tracking, which preferably uses predefined synthetic templates, the present invention uses templates taken from the stream of images being broadcast.

[0009] There is also prior art concerning motion estimation schemes. Digital video encoders employing motion estimation for data compression purposes extract image templates from video images and calculate motion vectors. A current image is tiled with a set of templates and motion vectors are calculated for each template using a previously transmitted image. The object is to reduce the number of bits needed to encode an image block by transmitting only a motion vector plus an optional correction factor as opposed to transmitting a complete image block. After coding the image the templates are discarded.

[0010] Typical block matching criteria for this scheme include L1 norm, L2 norm, and normalized correlation. L1 norm is defined as D=Σd, L2 norm is defined as Σd² where d is the difference in pixel values between the image and the template. The summation is carried out over all the pixels in each template. The normalized correlation is defined as: $N = \frac{\sum\quad {IT}}{\sqrt{\sum{I^{2}{\sum T^{2}}}}}$

[0011] where T represents the values in the template and I represents the values in the image.

[0012] In this description, block matching techniques will be defined so that the best match corresponds to the smallest value of the selected matching criteria. Thus, if normalized correlation were used as the block matching criteria the mismatch would be defined as: $M = {{1 - N} = {1 - \frac{\sum\quad {IT}}{\sqrt{\sum{I^{2}{\sum T^{2}}}}}}}$

[0013] As the template is moved over the current image the resulting array of values calculated using the selected block matching criteria is called an error surface and the best match occurs when the error surface has a minimum value.

[0014] Since the average illumination levels in the current image are likely to be similar to the matching blocks in the previously transmitted image, block matching is more reliable than using methods which include the average illumination information.

[0015] The present invention differs from motion estimation used in video encoding in a number of significant ways. In the present invention the templates are a carefully selected subset of the total blocks available rather than all possible positions. Careful choice of a region and template is necessary because, unlike motion estimation in compression algorithms, the result of the present calculation is not a set of motion vectors for the blocks, but rather a single transform model. In a “least square error” sense the single transform model is the best descriptor of the motion of the template ensemble. Moreover, the templates are placed in selected positions in the image rather than tiling the image. Further, the templates are stored in memory and are not discarded after each image is processed.

[0016] In the present invention, the current position of a template is determined relative to this previous position whereas in motion estimation the previous position is determined relative to the current tiled position. Motion estimation in video encoding is directed toward finding the best displacement match, i.e. that with the smallest coding error, to the current image from a previously transmitted image. In contrast, position location of the present invention is directed toward the visual correctness (the viewer's perception of the image) of the motion of the image. In ambiguous cases it is not important how motion estimation in video coding resolves the ambiguity but it is critical how the position location method of the present invention resolves the ambiguity. Resolution of the ambiguity may involve examination of the model as determined from other nearby blocks. Motion estimation has limited accuracy, often to ½ pixel, due to computational and coding requirements associated with increased accuracy. In position location, however, there are no such limits on accuracy.

SUMMARY

[0017] The present invention utilizes image templates taken directly from a broadcast video stream. Depending on the intended application, i.e. baseball, football, soccer, etc. . . . , specific capturing criteria are used to select templates from the current image. For long term spatial stability, templates are stored in memory and remain useful so long as the templates continue to meet certain retention criteria. Retention criteria include a satisfactory match to the current image of the broadcast as well as spatial consistency with other templates. Spatial consistency means that templates to be retained are consistent with other templates with respect to position as opposed to curvature. Templates are updated periodically to purge those no longer capable of giving satisfactory positional data. New templates selected from the current image are then used to replace those discarded. The position of each template is determined by comparing the template against the current image. The preferred comparison method uses an integer position search followed by a two-dimensional interpolation process to obtain positional information accurate to fractions of a pixel. A transform model is then calculated from the derived position data using additional data relating to the shape of the error surface near the matching position. The transform model provides a description of the current image so that indicia may be inserted into the current image in the desired location and correct perspective. There may be various forms for this transform model. For example, the simplest model defines the pan, tilt, and zoom of the camera recording the event. More complex models may include camera parameters such as roll, mounting offsets, and other camera motion. The transform model may be confirmed by examining pre-defined synthetic templates and the model can be adjusted if necessary. Changes in mis-match values over time allow video transitions such as scene cuts and fade-outs to be detected. Lastly, the system and method of the present invention is viable so long as there is texture in the current image. The texture need not be stationary, however, over periods longer than several frames of video, i.e. crowds.

BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The present invention can be better understood with reference to the following figures in which like numerals shall represent like elements in the various figures.

[0019]FIG. 1 illustrates a block diagram of the texture tracking system of the present invention.

[0020] FIGS. 2(a) and 2(b) illustrate two different image templates.

[0021]FIG. 3 is a block diagram of showing the functions of the position locator.

[0022]FIG. 4 illustrates a two-dimensional interpolation method used in the present invention.

[0023]FIG. 5 illustrates three overlaid block mismatch functions with respect to position.

[0024] FIGS. 6(a)-(c) illustrate a two dimensional optimization method used for locating the error surface minimum.

[0025]FIG. 7 illustrates spatial selection of blocks in an image, specifically for a soccer match.

[0026]FIG. 8 illustrates a typical image and camera trajectory A-B-C-D-E-F.

[0027] FIGS. 9(a)-(c) illustrate a vertical template, horizontal template, and an arrangement of these templates used to locate a football goal post.

[0028] FIGS. 10(a)-(c) illustrate the pan, tilt, and roll angles, focal length image size, and optic axis offset of a camera configuration.

DETAILED DESCRIPTION

[0029] Detection of an insertion target area is only one aspect of a complete insertion system. By way of background, an LVIS, or live video insertion system, is described in commonly owned application Ser. No. 08/563,598 filed Nov. 28, 1995 entitled “SYSTEM AND METHOD FOR INSERTING STATIC AND DYNAMIC IMAGES INTO A LIVE VIDEO BROADCAST”. An LVIS is a system and method for inserting static or dynamic images into a live video broadcast in a realistic fashion on a real time basis. Initially, natural landmarks in a scene suitable for subsequent detection and tracking are selected. Landmarks preferably comprise sharp, bold, and clear vertical, horizontal, diagonal or corner features within the scene visible to the video camera as it pans and zooms. Typically, at least three or more natural landmarks are selected. It is understood that the landmarks are distributed throughout the entire scene, such as a baseball park or a football stadium, and that the field of view of the camera at any instant is normally significantly smaller than the full scene that may be panned. The landmarks are often located outside of the destination point or area where the insert will be placed because the insert area is typically too small to include numerous identifiable landmarks and the insertable image may be a dynamic one and, therefore, it has no single, stationary target destination.

[0030] The system models the recognizable natural landmarks on a deformable two-dimensional grid. An arbitrary, non-landmark, reference point is chosen within the scene. The reference point is mathematically associated with the natural landmarks and is subsequently used to locate the insertion area.

[0031] Prior to the insertion process, artwork of the image to be inserted is adjusted for perspective, i.e., shape. Because the system knows the mathematical relationship between the landmarks in the scene, it can automatically determine the zoom factor and X, Y position adjustment that must be applied. Thereafter, when the camera zooms in and out and changes its field of view as it pans, the insertable image remains properly scaled and proportioned with respect to the other features in the field of view so that it looks natural to the home viewer. The system can pan into and out of a scene and have the insertable image naturally appear in the scene rather than “pop up” as has been the case with some prior art systems. The system can easily place an insertable image at any location.

[0032] The present invention relates to the tracking aspect of a live video insertion system. FIG. 1 illustrates a block diagram of a image texture tracking system of the present invention.

[0033] Tracking Controller

[0034] A tracking controller 1 controls the operation and sequencing of four modules: a position locator 2, a transform model calculator 3, a transform model confirmer 4, and a block updater 5. Position locator 2 reads block data 6 and determines the positions of templates in the current image. Blocks comprise templates and associated data. Position locator 2 stores the curent positions of the templates together with additional data in block data 6 once it has successfully located a template. Additional data includes data pertaining to how well a template matches the current image and how any mismatch varies with position. Transform model calculator 3 uses block data 6 to calculate a transform model. The transform model defines how a reference model must be changed in order to satisfactorily correspond to the current image. The reference model is a representation of a scene in a coordinate system independent of the current image coordinates. A camera model is a specific type of transform model expressed in terms of camera parameters only, e.g., pan, zoom, tilt, and roll. Transform model confirmer 4 ensures that the transform model is a visually correct description of the current image by looking for tracking errors as well as evidence of scene cuts and other digital video effects. Block updater 5 examines the blocks, purges memory of those no longer useful, and selects and stores replacement or new blocks. Each of the modules of FIG. 1 is normally activated once per field of interlaced video.

[0035] When an insertion target area is detected for the first time, tracking controller 1 activates block updater 5 to select and store blocks. The transform model derived from detection is used to relate the stored blocks to a reference model. These blocks are then used by position locator 2, model calculator 3, and model confirmer 4 in subsequent fields.

[0036] Position Locator

[0037] Position locator 2 determines the position of stored templates with respect to the current image. Templates typically consist of a rectangular array of pixels. Good results have been obtained from arrays of 8×8 to 16×16 pixels. Larger sizes give better results if the motion is simple while smaller sizes give better results for complex motion.

[0038] There are two types of templates, image templates which are derived from an image and synthetic templates which are predefined and not derived from any particular image. Synthetic templates are typically zero-mean templates. Zero-mean templates are templates whose average illumination levels are zero. They may be derived from templates by subtracting the average illumination level from each pixel in the template. FIG. 2a illustrates a zero mean template intended for detection of vertical edges and FIG. 2b illustrates a contrived image template showing a collection of pixel illumination levels for an 8×8 array. Blocks consist of one or more templates along with associated data. There are two types of blocks, image blocks which contain image templates and synthetic blocks which contain synthetic templates. Synthetic blocks are typically related to lines in the reference model while image blocks are typically related to points in the reference model.

[0039] Time permitting, the positions of all stored templates with respect to the current image are determined by searching. Unless the search is exhaustive over a predefined area, the time taken for search cannot normally be pre-determined and the tracking controller will normally set a time limit within which all searches must be completed. This time limit should allow for sufficient time for updating blocks. Generally, the time limits should be set so that the number of active blocks remaining after block updating can be adequately searched during subsequent fields. The number of blocks may vary as the video changes. Active blocks are those blocks that match the current image.

[0040] The position of each template is typically found by conducting a search over a limited region of the current image. An efficient way of searching is to perform matching at integer pixel positions using pre-selected block matching criteria. In order to obtain an accurate estimate of motion of the images, it is desirable to obtain an estimate of template position to sub-pixel accuracy. Sub-pixel accuracy is necessary for stability and accuracy of the transform model, particularly when only a small number of templates yield reliable position data. The search preferably takes place in two phases, an integer position search followed by a fractional pixel interpolation process.

[0041] For an integer position search, each template is positioned at several integer position positions in the current image and an error surface is calculated using the selected template capturing criteria. Normally, the minimum of the error surface is used as the integer position. If extensive computational resources are available, the search may be an exhaustive one over a large area. For greater efficiency, the local motion and position of the template may be predicted using recent history of the transform models together with the locations of any templates found in the current image. The estimated local motion vector is used to determine the size and shape of a region over which to perform the search. Since large motion vectors are likely to be less accurately predicted than small motion vectors, the size of the search region should increase as the magnitude of the vector increases. It is important to check the zero vector since replay or other video editing may perturb the predicted transform model. The zero vector represents no motion meaning the position of the template in the current image is identical to the position of the template in the previous image.

[0042] Prediction is important since it reduces computation time and can resolve positional ambiguities. For instance, if two equally good template locations are found then the template location closest to the predicted position is more likely to be the correct template location. Simple linear or second order prediction techniques are normally sufficient. Best results are obtained by predicting the camera motion rather than the image motion since cameras have physical inertia for pan and tilt, and zoom tends to be smooth. Note that video interlace can perturb simple field-to-field predictions and care should be taken to allow for this, either by using prediction schemes based on frames, or allowing for a video interlace offset. Also note that positional noise may be present due to camera vibration, and that during replay, or when the video has been edited, simple prediction models may not work. It is therefore important to allow for unpredictable behavior by continually checking for zero motion or by performing a wide search on a few selected blocks with templates having a well defined texture.

[0043] When tracking certain objects such as netting or fences, multiple error surface minima may be present. Such multiplicities can be resolved by prediction or by getting an initial estimate from those templates that exhibit only a single minimum. One way to choose from among multiple minima is to use a weighting function that places less emphasis on minima that are further from the predicted position and to select the best weighted minimum.

[0044] One method of conducting the integer position search is to exhaustively search a series of regions. The initial search region is centered on a predicted template position, and its size and shape depends on the local velocity of the pixels as estimated from predicted camera motion. If the minimum occurs at a border of the search region then a second search is done in a region which encloses the first minimum. When a minimum is found inside the predicted region, i.e. not on the boundary, the integer search terminates successfully. To avoid spending too much time on blocks which are likely to be in error, it is best to terminate the search after two or three steps. If a minimum is not found then this information is written into block data 6 so the block may be later purged by block updater 5.

[0045] Another option is to estimate the transform model as the template positions are progressively determined. As more reliable estimates are made, the search regions can be reduced in size and the number of permitted steps decreased.

[0046] Typical block matching criteria include L1 norm, L2 norm, and normalized correlation. L1 norm is defined as D=Σd, L2 norm is defined as Σd² where d is the difference in pixel values between the image and the template. The summation is carried out over all the pixels in each template. The normalized correlation is defined as: $N = \frac{\sum\quad {IT}}{\sqrt{\sum{I^{2}{\sum T^{2}}}}}$

[0047] where T represents the pixel values in the image template and I represents the values in the current image.

[0048] In this description, block matching techniques will be defined so that the best match corresponds to the smallest value of the selected matching criteria. Thus, if normalized correlation were used as the block matching criteria the mismatch would be defined as: $M = {{1 - N} = {1 - \frac{\sum\quad {IT}}{\sqrt{\sum{I^{2}{\sum T^{2}}}}}}}$

[0049] As the template is moved over the current image the resulting array of values calculated using the selected block matching criteria is called an error surface and the best match occurs when the error surface has a minimum value. The templates are a carefully selected subset of the total blocks available rather than all possible positions. Careful choice of a region and template is necessary because, unlike motion estimation in compression algorithms, the result of the present calculation is not a set of motion vectors for the blocks, but rather a single transform model. In a “least square error” sense the single transform model is the best descriptor of the motion of the template ensemble. Moreover, the templates are placed in selected positions in the image rather than tiling the image. Further, the templates are stored in memory and are not discarded after each image is processed.

[0050] In the present invention, the current position of a template is determined relative to this previous position whereas in motion estimation the previous position is determined relative to the current tiled position. Motion estimation in video encoding is directed toward finding the best displacement match, i.e. that with the smallest coding error, to the current image from a previously transmitted image. In contrast, position location of the present invention is directed toward the visual correctness (the viewer's perception of the image) of the motion of the image. In ambiguous cases it is not important how motion estimation resolves the ambiguity but it is important how the position location method of the present invention resolves the ambiguity. Resolution of the ambiguity may involve examination of the model as determined from other nearby blocks. Motion estimation has limited accuracy, often to ½ pixel, due to computational and coding requirements associated with increased accuracy. In position location, however, there are no such limits on accuracy.

[0051] After the integer position search terminates successfully, the fractional part of the motion vector is estimated. There are several ways of doing this.

[0052] After the integer search terminates successfully, the fractional part of the motion vector is estimated. The numerical values of the mismatch near the integer minimum give an error surface. The shape of the error surface depends on both the block matching criteria, the template, and the current image. A preferred method uses L1 norm for integer search followed by trianglar interpolation for fractional estimation. One dimensional triangular interpolation is illustrated in FIG. 3. Lines of equal but opposite slope are constructed through the integer minimum 32 and the two adjacent points 31 and 33. Parabolic interpolation, which is also illustrated in FIG. 3, fits a parabola through the same three points. Parabolic interpolation lends itself to some two-dimensional interpolation methods, and is suitable for L2 norm block matching. Parabolic and triangular interpolation generally give different values for the position and magnitude of the minimum. Three halves power interpolation, which is intermediate between triangular and parabolic interpolation, can sometimes give better results. Use of additional points to fit a cubic or spline function is not worthwhile for the block matching functions described here.

[0053] Location of the error surface minimum requires a two-dimensional optimization method. Several such methods are available. The image template may be expanded to give values at sub-pixel positions and the integer position search applied to these sub pixel positions. A second method uses a sequence of one dimensional interpolations, and a third method is to fit a two dimensional surface directly to the error surface.

[0054] The first method is illustrated in FIGS. 6(a)-(c). The source pixels in FIG. 6(a) are spaced apart and the in between values filled in by, for example, bi-linear interpolation as shown in FIG. 6(b). If the expansion is by a factor of n, the template pixels are matched against every n^(th) expanded image pixel and the positional accuracy is 1/n pixel. The template shown in FIG. 6 (c) matches the expanded image template if it is positioned ½ pixel to the right and ¼ pixel down with reference to FIG. 6(a). This method is computationally costly since n² matches must be made to get an accuracy of 1/n.

[0055] The second method is illustrated in FIG. 4. It uses the error surface values near the minimum found by integer position search 40. Minima are interpolated for horizontal scan lines above 41, at 42, and below 43 the integer minimum, using a one-dimensional interpolation method. The final minimum is interpolated from these three minima 44. Note that for a large class of mathematically modeled two dimensional surfaces, this technique yields perfectly accurate interpolated positions.

[0056] The curvatures of the error surface are also estimated. If the template defines a horizontal and vertical edge, or a textured structure, then the horizontal and vertical curvatures should be estimated. A simple estimation is an (A−2B+C) representation where B is the value of the error surface at the minimum and A and C are values equidistant from the minimum on each side. For parabolic interpolation the positions of the measurements are not critical, so it may be computationally convenient to use the integer position values. For other interpolation methods, e.g. triangular, the position is important, and the interpolated values might be used instead. If the template defines a diagonal edge, then the curvature perpendicular to the edge should be measured. The measured or estimated curvatures contribute to the block weighting used by model calculator 3.

[0057] Block matching may be performed by any of the previously mentioned techniques, e.g. L1 norm, L2 norm, or normalized correlation. L1 norm is computationally the simplest. In video coding it is normal to measure only the luma component of the image for motion estimation. Although luma usually contains most of the high spatial frequency information, the chroma components may provide additional information, particularly useful in resolving positional ambiguities. Block mismatch functions can be adjusted to incorporate chroma information. In all matches, the values are summed for the particular color space using weights to combine the color planes. In Y, U, and V color space and other similar color spaces, the luma component normally contains most of the high spatial frequency information and is the most important component for positional matching.

[0058] A third method for finding the two-dimensional position of the minimum of the error surface is to assume the error surface has a particular shape near the minimum and interpolate the position of the minimum using a singular value decomposition method such as described in “Numerical Recipes in C” 2^(nd). Ed., W. H. Press et al., Cambridge University Press, 1992, p. 59. The shape could be a second degree surface, an elliptical cone, or other shape.

[0059] Care must be taken in applying two dimensional minimization methods since diagonal edges can result in positions that are very susceptible to pixel measurement noise. It is recommended that the minimum found by interpolation methods not be allowed to deviate by more than a pixel from the position indicated by the integer search.

[0060] A problem with simple interpolation methods, however, is that they do not account for intrinsic asymmetry of the error surface. Appendix A-2 illustrates the source of the intrinsic asymmetry. The preferred way to achieve a more accurate estimation is to do an interpolation of the error surface found using the original image, i.e. the image from which the template was extracted, and measure the offset. This can become part of the reference position. Another method is to measure the shape of the error surface using the original image, and then calculate the position of the minimum based on deviations from this shape rather than the measured shape in subsequent images.

[0061] In order to extend the search range without incurring a large computational penalty, a multi-resolution search may be employed. The image is first low-pass filtered and sub-sampled to provide a series of lower resolution images. Blocks, or sets, of images are saved at each resolution level. Searching and block matching are performed at each resolution level, starting with the lowest resolution level. A transform model is calculated for each resolution level and used to predict the block positions for the next highest resolution level. This process reduces the search range at each resolution level. The transform model is refined at each resolution level and the final transform model is obtained at the highest resolution level. In some cases, e.g., rapid camera motion which blurs image details, it may not be possible to calculate an accurate transform model at the highest resolution level. In such cases the transform model calculated at a lower resolution level can and should be used.

[0062] Transform Model Calculator

[0063] A reference model is a representation of an image in a coordinate system that is independent of the current image coordinates. A transform model defines the way in which the reference model must be changed in order to correspond to the current image. Simple transform models use three parameters: zoom, horizontal shift and vertical shift. More complete transform models use more camera parameters. These camera parameters include pan, tilt, roll, zoom, and focal length. The camera models account for perspective changes in the scene. More complex transform models may account for additional changes such as camera mount offsets, lens distortions, and lighting variations. A camera model is illustrated in FIGS. 10(a)-(c) which shows how a camera may be defined in terms of pan, tilt, and roll angles together with focal length, image size, and optic axis offset.

[0064] Various techniques may be used to calculate the transform model. The preferred technique is a mean square error method which seeks to minimize the mean square error of a mismatch function. A useful addition to this technique is to dynamically vary the weights for the block positions. This reduces the effect of outliers below that of mean square methods. Outliers are those blocks which have a position differing significantly from that determined by the majority of the blocks. Dynamically varying the weights is important since blocks may be in error due to systematic image content rather than random noise which is assumed by many mean square error methods. The preferred method first sets horizontal and vertical weights for each block depending on the corresponding curvatures of the error surface. It then calculates a preliminary transform model using the mean square error minimization method. Each block is evaluated to determine how well it agrees with the preliminary transform model. Block weights are then modified depending on the spatial error. The final model is calculated using the modified weights. This two-step technique reduces or eliminates the effect of outliers. One way to calculate the transform model is given in appendix A-4.

[0065] Transform Model Confirmer

[0066] Confirmation of the transform model is performed by examining synthetic or pre-defined blocks. For example, if a football goalpost is known to be lighter that the background then it can be detected using the templates of FIG. 9(a) for the uprights and FIG. 9(b) for the horizontal crossbar as arranged in FIG. 9(c). The block matching method for the zero mean templates would be maximizing the sum of the product of the template pixels and the image pixels and the image pixels. In order to confirm the pressure of a goal post as opposed to some other image feature consisting of intersecting lines. The templates marked with an asterisk in FIG. 9(c) must not give a positive correlation, i.e. the horizontal must not extend outside the uprights and the vertical must not extend below the crossbar. If a sufficient number of such blocks are active and giving reliable positional information, a separate transform model may be calculated from these blocks and used to partially adjust the main transform model. If only a few are visible then the adjustment should be small so as not to unduly perturb the transform model. If predefined blocks cannot be found, or if mismatches are of increasing amplitude, then a scene cut may have occurred, or a wipe or fade may be in progress. A detailed evaluation of predefined blocks together with recent history of the image blocks allows a determination of scene transition.

[0067] If the mismatch occurs in nearly all templates and is progressively increasing, then a fade is indicated. If a mismatch occurs along a boundary line dividing the image, then a wipe is indicated. The problem of reliably detecting scene transitions is simplified if it is known a priori what types of transitions can occur. The problem of detecting an unknown transition is difficult since such transitions can mimic changes that take place in a continuous shot.

[0068] Note that scene transition information might be made available by means of a separate signal, perhaps incorporated in the vertical blanking interval, or encoded within the image itself.

[0069] An estimate of the reliability of the transform model may be used during this confirmation step. Less reliable transform models may require more extensive confirmation. Reliability may be estimated from the sum of the weights as calculated by the transform model calculator. This sum takes into account the number of blocks, their texture or curvature of the error surface, and the mismatch from the transform model.

[0070] Once the transform model has been found and confirmed, insertion may be completed using the methods described in U.S. Pat. No. 5,264,933 or the method described in co-pending application 08/ entitled “Tapestry”.

[0071] Block Updater

[0072] Blocks are periodically examined in order to determine whether they should be retained. Block updating is preferably done in either the odd only fields or even only fields in order to reduce video interlace stability problems. In the preferred embodiment updating is done on even tracking fields counting the first tracking field as zero.

[0073] There are two steps in the block updating procedure, purging old blocks and assigning new blocks.

[0074] The first step of the block updating procedure is to purge blocks that do not meet the template retention criteria. In order to be retained for further use each stored block must typically satisfy the following retention criteria:

[0075] The stored block must be in the image safe area (e.g. not in the horizontal blanking area)

[0076] The stored block must not be in an active image burn-in region (e.g. not overlapping on-screen graphics)

[0077] The stored block's position must agree with the current transform model

[0078] The stored block must have sufficient curvature of the error surface.

[0079] There may be some additional application specific retention criteria. For example, in tracking a grass playing field the template may only overlap grass and not players.

[0080] The second step of the block updating procedure is to assign or extract new blocks. Blocks are first assigned to predefined positions in the reference model then to random positions in a search area in the reference model as transformed to the image.

[0081] It is important to always complete the first step in the updating procedure so that invalid blocks are eliminated. The second step may be terminated when time expires or when a sufficient number of templates have been captured. This procedure dynamically adjusts the number of stored blocks to match.

[0082] Image templates are copied from the image, optionally processed, and stored in a memory. The number of templates extracted may depend on the processing time available.

[0083] For purposes of extraction, image blocks may be divided into two types, point blocks and area blocks. Point blocks have predefined positions in the reference image. One example of a point block could be the corner of a football goal post. A template is assigned to the image position closest to that calculated from the reference model using the transform model. If it meets the criteria for successful storage, its actual position in the reference model is stored. This will deviate from the reference position by an amount less than half an image pixel calculated using the transform model for the image from which it was copied. Area blocks are randomly assigned within a search area in the reference model. If they meet the criteria for successful storage, their actual positions in the reference model are stored.

[0084] In order to make efficient use of the available processing resources, each extracted template must satisfy certain template capturing criteria. Its position must be in the safe area, i.e., each extracted template must be away from the edges of the image, and, in particular, away from any darkening or other effects due to video blanking. Moreover, each extracted template must be in the search area, i.e., in an area known to the controller based on previous analysis. For example, templates in a stadium may be captured from the stands or from stadium structures rather than the playing field in order to avoid spatial perturbations due to the motion of players. Each extracted template must be predicted not to leave these areas, the prediction being based on recent history of camera motion. Further, each extracted template must not be in any exclusion areas, e.g. a burn-in area which is showing an on-screen message independent of the source video, and should be predicted to avoid these areas in the near future. Lastly, each extracted template should not overlap any other existing templates for efficiency, although a slight overlap may be allowed. It must possess sufficient texture for the selected block-matching criteria to work. The texture may be determined by one of a number of means, e.g. measuring the luma variation, or applying the template to the source image and measuring the shape of the error surface. If all these conditions are satisfied, then the image template is extracted.

[0085] In certain situations there may be additional template capturing constraints on the templates. These may relate to the color or texture of the image itself. For example, if it is desired to track a red object, then all templates must include some red pixels. For another example, if it is desired to track the grass surface of a playing field, then templates should exclude regions that contain non-grass colors in order to exclude the players. Grass may be defined as a certain volume in three dimensional color space. An additional calculation would allow the inclusion of the playing field lines in the templates.

[0086] Templates may be processed in a number of ways. They may be filtered to reduce noise and other artifacts, but this may have the unwanted effect of reducing the spatial accuracy of the match. They may be compared with previously captured templates in the same area and averaged to reduce noise. They may be adjusted for zoom or perspective variations based on the calculated camera actions.

[0087] Instead of copying a new template from the current image, inactive blocks may be reactivated by retrieving templates from memory and matching them to the current image. They may be matched directly, or changed in magnification, shape or brightness or otherwise, in order to match the current transform model and image illumination. This has the advantage of increasing long term stability.

[0088] The shape of the template surface is important. The directions and values of maximum and minimum curvature should be determined so that it can be determined if the template represents a horizontal or vertical edge, or has a two-dimensional structure. One way to do this is to use the block matching to generate an error surface for the source image. The curvature of the error surface indicates the type of image feature. Some methods of calculating the transform model do not recognize diagonal edges, and the presence of such edges can reduce the accuracy of the model. On the other hand, such templates will be purged when they give an incorrect position and have no long term effect on the accuracy of the transform model. However, for scenes where diagonal lines form an important part of the spatial locating information, e.g. for tennis courts, diagonal lines should be recognized and used to provide positional information only in a perpendicular direction.

[0089]FIG. 7 illustrates selection of blocks for tracking the motion of a soccer field. The blocks are selected so that the entire block plus a safety region around each block consists entirely of the playing surface, in this case grass. Grass is defined by a certain volumetric shape in three dimensional color space. If any pixel lies outside this region the block is rejected.

[0090]FIG. 8 illustrates the tracking procedure as camera pan and tilt change. For simplicity, it is assumed that the lighting and the zoom are constant. The bottom right corner of the goal post is assumed to follow the trajectory A-B-C-D-E-F relative to the image outline. During the trajectory from A to B, tracking is performed using a mix of predefined and image texture blocks. A full model confirmation based on the size and shape of the goal posts is possible. At point B, the horizontal crossbar disappears from view. A full model confirmation is no longer possible but zoom and pan can still be calculated from the landmark blocks alone. The blocks that were on the crossbar are reassigned to other parts of the image. From B to C tracking continues using the stored blocks. At point C the right upright disappears from view and the blocks associated with it are reassigned. At point D the horizontal crossbar is predicted to reappear, and a search is conducted using the landmark blocks. After the crossbar is located, any discrepancies in the model are slowly resolved so as not to disturb the insert location. At point E the right upright becomes visible, and, between E and F, full model confirmation is again possible.

[0091] During tracking, area blocks tend to migrate to that area of the image which most accurately defines the transform model. For example assume that a scene cut occurs to an insertion scene where large foreground objects are visible. Area blocks will be randomly assigned to both foreground and background. Unless the foreground has the majority of blocks and moves with internal consistency, the transform model will be defined by the background. As soon as part of the foreground moves relative to the background, any blocks assigned to it will be inconsistent with the transform model and will be purged then randomly reassigned, eventually ending up on the background. Block migration increases the stability of the insertion position.

[0092] Another type of block migration, between types of blocks, is illustrated by a typical clay court tennis match. At the beginning of the match the court lines are clear and well marked, and the court surface is smooth. The lines will be covered by synthetic blocks, and there will be few image blocks on the court surface. During the match, the lines typically become obscured and the court surface becomes rougher and gains texture. The synthetic blocks are progressively purged and image blocks progressively added to the court.

[0093] Blocks may be purged, but the template stored for possible future use. For example, if the zoom has changed so that a template no longer provides a good match, a new template may be captured and the old one placed in a long-term storage. At some future time, the zoom may return to its former value, in which case the old template may be retrieved and tested to see whether it can provide a useful match.

[0094] Appendices

[0095] Four appendices have been included herewith further describing and illustrating certain aspects of the present invention. Appendix A-1 is a comparison of selected block matching criteria against possible current image blocks. Appendix A-2 is a more detailed description of a one dimensional fractional estimation illustrating the source of asymmetry of a surface associated with simple interpolation methods. Appendix A-3 is a glossary of terms used throughout the text of this document. Lastly, appendix A-4 is a specific method for calculating an optimum three parameter non-perspective tracking model from the measurement of derived image templates. 

What is claimed is:
 1. A method for tracking motion in a stream of images, comprising the steps of: a) selecting one or more image templates from an original image, said image templates satisfying one or more template capture criteria; b) storing said image templates; c) using a first transform model to relate said image templates to a reference model, said reference model representing said original image in a coordinate system; d) determining a current position of said image templates with respect to a current image; e) calculating a current transform model using said current positions, said current transform model defining the way in which said reference model must be change in order to correspond to said current image; f) purging said image templates that fail one or more template retention criteria; and, g) extracting new image templates from said current image, said new image templates satisfying one or more template capture criteria;
 2. The method of claim 1 wherein each of said image templates includes an array of pixels substantially less than all the pixels in said current video image.
 3. The method of claim 1 wherein said first transform model is derived when a target area is detected.
 4. The method of claim 3 wherein said detection uses a pose of a camera.
 5. The method of claim 1 wherein said current transform model includes one or more camera parameters.
 6. The method of claim 1 wherein said image templates include one or more synthetic templates.
 7. The method of claim 1 further including the steps of: h) selecting one or more low resolution image templates from a low resolution original image, said low resolution image templates satisfying one or more template capture criteria; and, i) determining a low resolution current position of said low resolution image templates with respect to at least one low resolution current image, wherein said step f) of calculating a current transform model optionally uses said low resolution current positions.
 8. The method of claim 1 wherein said template capturing criteria includes a color constraint.
 9. The method of claim 1 wherein said template capturing criteria includes a texture constraint.
 10. A method for tracking motion in a sequence of images comprising the steps of: a) obtaining a set of image templates and original positions from an original image, said image templates satisfying one or more template capture criteria; b) storing said image templates and original positions; c) determining current positions of said image templates in a current image; d) calculating a transform model based on said original positions and said current positions, said transform model being indicative of changes between said original image and said current image; e) purging said image templates that fail one or more template retention criteria; and, f) obtaining new image templates from said current images.
 11. The method of claim 10 wherein said step f) of obtaining new image templates further includes obtaining new image templates from said original image.
 12. The method of claim 10 wherein said transform model further includes one or more indicators of change within said current image.
 13. The method of claim 10 wherein said transform model further includes one or more indicators of changes of camera parameters used to obtain said original and said current images.
 14. The method of claim 10 further including the steps of: g) archiving said purged image templates; and, h) reusing said archived image templates when they are predicted to appear in said current image.
 15. The method of claim 14 further including the step of: i) processing said archived image templates prior to said step c) of determining a current position.
 16. The method of claim 10 further including the step of: j) processing said stored image templates prior to said step c) of determining a current position.
 17. The method of claim 10 further including the step of: k) detecting image feature positions, and wherein said step d) of calculating a transform model is further based on said image feature positions.
 18. The method of claim 17 where in said step d) of calculating a transform model further includes gradual modifications of said transform model to conform to said image feature positions.
 19. An apparatus for tracking motion in a stream of video images, comprising: means for deriving a first transform model; means for selecting one or more image templates from an original image, said image templates satisfying one or more template capture criteria; means for storing said image templates; means for using said first transform model to relate said image templates to a reference model, said reference model representing said original image in a coordinate system; means for determining a current position of said image templates with respect to a current image; means for calculating a current transform model using said current positions, said current transform model defining the way in which said reference model must be changed to correspond to said current image; means for purging said image templates that fail one or more template retention criteria; and, means for extracting new image templates from said current image, said new image templates satisfying one or more template capture criteria;
 20. An apparatus for tracking motion in a sequence of images, comprising: means for obtaining a set of image templates and original positions from an original image, said image templates satisfying one or more template capture criteria; means for storing said image templates and original positions; means for determining current positions of said image templates in a current image; means for calculating a transform model based on said original positions and said current positions, said transform model being indicative of changes between said original image and said current image; means for purging said image templates that fail one or more template retention criteria; and, means for obtaining new image templates from said current images. 